<template>
  <div class="login">
    <div style="margin-bottom: 20px">登陆逻辑</div>
    <a-button type="primary" @click="hanleLogin">登陆</a-button>
  </div>
</template>

<script setup>
import { useUserStore } from '@/store/modules/user'
import { useRouter } from 'vue-router'

const userStore = useUserStore()
const { push } = useRouter()

const hanleLogin = () => {
  userStore.handleLogin('token123')
  push({
    path: '/dashboard'
  })
}
</script>

<style lang="less" scoped>
.login {
  text-align: center;
  padding-top: 100px;
}
</style>
